﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;
using Qadir.Text;

namespace QadirRegexFilterSample
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            CheckForIllegalCrossThreadCalls = false;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Dictionary<string, string> filter = RegularExpressions.Filter(inputBox.Text, filterBox.Text);
            foreach (string key in filter.Keys)
            {
                outputBox.Text += string.Format("{0} => \"{1}\"\n", key, filter[key]);
            }
        }
    }
}
